package top.suven.base.http.message;


/**
 * @author skyyu
 *
 */
public class RequestMessage extends RequestBaseMessage {
	
	private long userId;       //用户Id，pid
	private int appId;     //客户端kugou登录申请的appid
	private String accessToken;     //令牌
	private String device;   //设备标识
	private String sysVersion;//客户端手机系统版本号
	private long times;      //时间戳13位 1387614995111
	private int channel;      //app第三方渠道号
	private String ip;
	private String uri;
	private long clientId;
	private String cuid;
	private String channelCode;//用户来源（com.redfinger.app）
	private String authCode;//授权码
    private String sessionId;//会话编号

	public RequestMessage(){}
	
    public static RequestMessage valueOf(RequestBaseMessage cmessage){
		if(cmessage ==null){
			return null;
		}		
		RequestMessage message = new RequestMessage();
		message.setPlatform(cmessage.getPlatform());
		message.setCliSign(cmessage.getCliSign());
		message.setVersion(cmessage.getVersion());
		message.setV(cmessage.getV());
		return message;
	}


	public long getUserId() {
		return userId;
	}

	public void setUserId(long userId) {
		this.userId = userId;
	}

	public int getAppId() {
		return appId;
	}

	public void setAppId(int appId) {
		this.appId = appId;
	}

	public String getAccessToken() {
		return accessToken;
	}

	public void setAccessToken(String accessToken) {
		this.accessToken = accessToken;
	}


	public String getDevice() {
		return device;
	}

	public void setDevice(String device) {
		this.device = device;
	}

	public String getSysVersion() {
		return sysVersion;
	}

	public void setSysVersion(String sysVersion) {
		this.sysVersion = sysVersion;
	}

	public long getTimes() {
		return times;
	}

	public void setTimes(long times) {
		this.times = times;
	}

	public int getChannel() {
		return channel;
	}

	public void setChannel(int channel) {
		this.channel = channel;
	}

	public String getIp() {
		return ip;
	}

	public void setIp(String ip) {
		this.ip = ip;
	}

	public String getUri() {
		return uri;
	}

	public void setUri(String uri) {
		this.uri = uri;
	}

	public long getClientId() {
		return clientId;
	}

	public void setClientId(long clientId) {
		this.clientId = clientId;
	}

	public String getCuid() {
		return cuid;
	}

	public void setCuid(String cuid) {
		this.cuid = cuid;
	}

	public String getChannelCode() {
		return channelCode;
	}

	public void setChannelCode(String channelCode) {
		this.channelCode = channelCode;
	}

	public String getAuthCode() {
		return authCode;
	}

	public void setAuthCode(String authCode) {
		this.authCode = authCode;
	}

	@Override
	public String toString() {
		return "RequestMessage{" +
				"userId=" + userId +
				", appId=" + appId +
				", accessToken='" + accessToken + '\'' +
				", device='" + device + '\'' +
				", sysVersion='" + sysVersion + '\'' +
				", times=" + times +
				", channel=" + channel +
				", ip='" + ip + '\'' +
				", uri='" + uri + '\'' +
				", clientId=" + clientId +
				", cuid='" + cuid + '\'' +
				", channelCode='" + channelCode + '\'' +
				", authCode='" + authCode + '\'' +
				", sessionId='" + sessionId + '\'' +

				'}';
	}

	public String getSessionId() {
        return sessionId;
    }

    public void setSessionId(String sessionId) {
        this.sessionId = sessionId;
    }


}
